#include "Seqlist.h"
void SLinit(SL* sl)
{
	sl->arr = NULL;
	sl->size = 0;
	sl->capacity = 0;
}
void SLPushBack(SL* sl, SLDateType x)
{
	int newcapacity= sl->capacity == 0 ? 4 : 2*sl->capacity;
	if (sl->size == sl->capacity)
	{
		SLDateType* tmp = (SLDateType*)realloc(sl->arr, newcapacity*sizeof(SLDateType));
		if (tmp == NULL)
		{
			perror("tmp");
			exit(1);
		}
		sl->arr = tmp;
	}
	sl->arr[sl->size++] = x;
}